home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm4_3_1
- Caption = "Convert Fahrenheit to Celsius"
- ClientHeight = 1770
- ClientLeft = 1230
- ClientTop = 1695
- ClientWidth = 3840
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1770
- ScaleWidth = 3840
- Begin VB.PictureBox picTempC
- Height = 255
- Left = 2640
- ScaleHeight = 195
- ScaleWidth = 915
- TabIndex = 4
- Top = 1320
- Width = 975
- End
- Begin VB.CommandButton cmdConvert
- Caption = "Convert to Celsius"
- Default = -1 'True
- Height = 495
- Left = 240
- TabIndex = 2
- Top = 600
- Width = 3375
- End
- Begin VB.TextBox txtTempF
- Height = 285
- Left = 2640
- TabIndex = 0
- Top = 240
- Width = 975
- End
- Begin VB.Label lblTempC
- Caption = "Temperature (Celsius)"
- Height = 255
- Left = 480
- TabIndex = 3
- Top = 1320
- Width = 1935
- End
- Begin VB.Label lblTempF
- Caption = "Temperature (Fahrenheit)"
- Height = 255
- Left = 240
- TabIndex = 1
- Top = 240
- Width = 2295
- End
- Attribute VB_Name = "frm4_3_1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdConvert_Click()
- picTempC.Cls
- picTempC.Print FtoC(Val(txtTempF.Text))
- End Sub
- Private Function FtoC(t As Single) As Single
- 'Convert Fahrenheit temperature to Celsius
- FtoC = (5 / 9) * (t - 32)
- End Function
-